package com.xiaoyushu.distributed.id.generator.api;

import com.xiaoyushu.distributed.id.generator.contstant.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(name = ApiConstants.SERVICE_NNAME)
public interface DistributedIdGeneratorFeignApi {

    String PREFIX="/id";

    @RequestMapping(value = PREFIX+"/segment/get/{key}")
    String getSegmentId(@PathVariable("key") String key);

    @RequestMapping(value = PREFIX+"/snowflake/get/{key}")
    String getSnowflakeId(@PathVariable("key") String key);
}
